<?php
/**
 * Created by PhpStorm.
 * User: ZZF
 * Date: 2017/3/16
 * Time: 11:36
 */

namespace app\admin\model;
use think\Model;
use think\Verify;
class AdminModel extends Model{
	protected $validate = [
         'rule' => [
			 'username' => "require|unique:admin|length:6,32",
			 'password' => "require|length:6,32"
		 ],
         'msg'  => [
			 'username.require' => "账号必须填写！",
			 'username.unique' => "账号已存在！",
			 'username.length' => "账号长度必须不少于6且不超过32",
			 'password.require' => "密码必须填写！",
			 'password.length' => "密码长度必须不少于6且不超过32"
		 ]
    ];

    public function check_verify(){
        $verify = new Verify();
        return $verify->check(input('verify'));
    }
}
